from base.base import *
from page.page_work_center import *


class WorkCenterPage(Base):
    def __init__(self, driver):
        super().__init__(driver)

    def page_get_username_text(self):
        return self.base_get_text(WorkCenterPageElements.click_username)

    def page_back(self):
        self.base_page_back()

    def page_go_to_page(self, url):
        self.base_go_to_page(url)

    def page_click_financial_shared(self):
        self.base_click(WorkCenterPageElements.click_financial_shared)

    def page_click_Online_reimbursement_platform(self):
        self.base_click(WorkCenterPageElements.click_Online_reimbursement_platform)

    def page_click_Reimbursement_for_vehicle_use_fee(self):
        self.base_click(WorkCenterPageElements.click_Reimbursement_for_vehicle_use_fee)

    def page_go_to_Reimbursement_for_vehicle_use_fee(self):
        self.page_click_financial_shared()
        self.page_click_Online_reimbursement_platform()
        self.page_click_Reimbursement_for_vehicle_use_fee()

    def page_switch_to_Vehicle_use_fee_total_frame(self):
        self.base_switch_to_frame(WorkCenterPageElements.frame_Vehicle_use_fee_total)

    def page_switch_to_Vehicle_use_fee_frame(self):
        self.base_switch_to_frame(WorkCenterPageElements.frame_Vehicle_use_fee_new)
